local cGridSize = 33
cc.exports.cGridSize = cGridSize
local scaleRate = 1 / display.contentScaleFactor

--这个函数前的local不能省，不能直接用全局变量
local function Grid2Pos( x, y )
    local visibleSize = cc.Director:getInstance():getVisibleSize()
    local origin = cc.Director:getInstance():getVisibleOrigin()

    local finalX = origin.x + visibleSize.width / 2 + x * cGridSize * scaleRate
    local finalY = origin.y + visibleSize.height / 2 + y * cGridSize * scaleRate

    return finalX, finalY
end
--这样就能用cc.exports.XXX当全局变量用了
cc.exports.Grid2Pos = Grid2Pos

local cBound = 7
cc.exports.cBound = cBound